package com.example.uniappspringbootstartweb.service.Imp;

import com.example.uniappspringbootstartweb.entity.Publish;
import com.example.uniappspringbootstartweb.entity.Shares;
import com.example.uniappspringbootstartweb.mapper.PublishRepository;
import com.example.uniappspringbootstartweb.service.PublishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author DELL
 */
@Service
public class PublishServiceImpl implements PublishService {

    @Autowired

    private PublishRepository repository;

    @Override
    public List<Publish> findAllByUserid(Long userid) {
        return repository.findAllByUserid(userid);
    }

    @Override
    public List<Publish> getPublishByContentid(Long contentId) {
        return repository.findByContentid(contentId);
    }
}



